<?php 

//连接数据库
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}else{
    mysql_select_db('test', $link) or die('Could not select database.');
    mysql_query("set names 'utf8'",$link);
}
$list = mysql_query("select * from vote_profile where is_del=0");
// $result = mysql_fetch_array($list,MYSQL_ASSOC);
while ($row = mysql_fetch_array($list,MYSQL_ASSOC)) {
    $lists[] = $row;
}
// pr($result);
include 'votelist.html';


function pr($data){
    print('<pre>');
    print_r($data);
    print('</pre>');
}